#pragma once
#include "GameObject.hpp"
#include "GameComponent.hpp"
#include "Property.hpp"
#include <vector>

namespace Typhoon {
	class Hierarchy : public GameComponent<Hierarchy>
	{
	public:
		Hierarchy();
		~Hierarchy();

		Property<Hierarchy*, GameObject*> Parent;

		int ChildrenCount();
		GameObject* GetChild(int index);
		
	private:
		typedef std::vector<GameObject*> Children;
		Children children;

		void ParentChanged(Property<Hierarchy*, GameObject*>::EventData data);
	};
}
